<template>
<t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
    </t-image-viewer>
    <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
    </van-image-preview>
  <div class="outline-parent jy-style-height ">
    
   
    <div class="content-parent border-hover-style">
       <div class="digitalShowroom-p" v-if="props.info.digitalShowroom">
      <!-- digitalShowroom -->
      <digitalShowroomIcon :url="props.info.digitalShowroom" />
    </div>
     <div class="bottom-box">
        <div class="title-box-parent">
        <div class="title-box">
          <div class="solid-1">
            <div class="solid"></div>
          </div>
          
          <p class="title">{{ props.info.text }}</p>
        </div>
      </div>
      <p class="subtitle">
        {{ props.info.subTitle }}
      </p>
      <div class="img-box" v-if="props.info.value">
        <img
          class="outline-cover"
          @click="ImgVisible = true"
          :src="urls + props.info.value + '?imageView2/3/format/webp'"
          alt=""
        />
        <div class="radio1 radio"></div>
        <div class="radio2 radio"></div>
        <div class="radio3 radio"></div>
        <div class="radio4 radio"></div>
      </div> 
      <div class="remarks1" v-if="props.info.value">
        <TextMax :infoData="props.info" v-if="props.domShow" :data="props.info.remarks" :title="props.info.text" :row="3"></TextMax>
      </div>
      <div class="remarks2" v-else> 
        <TextMax :infoData="props.info" v-if="props.domShow" :data="props.info.remarks" :title="props.info.text" :row="7"></TextMax>
      </div>
     </div>
    </div>
  </div>
</template>  

<script lang="ts">
export default defineComponent({
  name: 'free3Style4',
});
</script>

<script setup lang="ts">
import digitalShowroomIcon from '@/freeComponents/unitdigitalShowroom/style2.vue';
import { publicUrls } from '@/utils/minxin';
import { getTextHtml, textType } from '@/utils/minxin';
import { urls } from '@/utils/request/upload';
import { computed, defineComponent, ref } from 'vue';
import TextMax from '@/freeComponents/textMode/TextMax3.vue';
import { useProjectStore } from '@/store';

const ImgVisible = ref(false);
const store = useProjectStore();
const title = ref();

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  position: relative;
   margin-right: 140px;
  margin-left: 40px;
  margin-top: 0;
  height: 100%;
}
.content-parent {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 426px;
  height: 684px;
  background-image: url('https://static.jiyi.show/free/style3/Level3outlinestyle2Bg.webp');
  background-size: 100% auto;
  background-repeat: no-repeat;
}
.bottom-box{
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-left: 32px;
padding-right: 42px;
}
.title-box-parent {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 58px;
}
.title-box {
  display: flex;
  align-items: center;
  position: relative;
  height: 70px;
}
.solid-1{
  position: absolute;
  top: 0;
  left: 11px;
  height: 70px;
  width: calc(100% - 22px);
  padding: 4px; 
  border: 1px solid rgba(98, 51, 51, 0.5);
}
.solid {
  width: 100%; 
  height: 100%;
  background-image: url('https://static.jiyi.show/free/style3/Level3outlinestyle2xt.webp');
  background-size:auto 100%;
  background-repeat: repeat;

  // object-fit: contain;
}
.title {
  position: relative;
  z-index: 4;
  height: 42px;
  font-family: SourceBold;
  font-size: 22px;
  color: #2f1b16;
  line-height: 42px; 
  background: #e1dbcf;
} 
.subtitle {
  width: 352px;
  height: 48px;
  font-family: SourceMedium;
  font-size: 18px;
  color: #2f1b16;
  line-height: 24px;
  text-align: center;
  margin-top: 80px;
  opacity: .5;
}
.img-box {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  width: 352px;
  height: 200px;
  background: #623333;
  margin-top: 24px;
  // border-radius: 8px;
}
.outline-cover { 
  height: 200px;
  max-width: 352px;
  width: auto;
  object-fit: contain;
  transition: all 0.3s;
}
.outline-cover:hover {
  transform: scale(1.2);
}
.radio {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e1dbcf;
  z-index: 6;
}
.radio1 {
  top: -8px;
  left: -8px;
}
.radio2 {
  top: -8px;
  right: -8px;
}
.radio3 {
  bottom: -8px;
  left: -8px;
}
.radio4 {
  bottom: -8px;
  right: -8px;
}
.remarks1 {
  width: 352px;
  margin-top: 24px;
}
.remarks2 {
  width: 352px;
  margin-top: 120px;
}
.digitalShowroom-p {
  width: 50px;
  height: 50px;
  position: absolute;
  top: 6px;
  right: 16px; 

  z-index: 15;
}
</style>